<template>
  <swiper class="swiper-box"  :autoplay="autoplay" :interval="interval"
          :duration="duration" :indicator-color="indicatorcolor" :indicator-active-color="indicatoractivecolor">
    <block v-for="(item, index) in images" :key="index">
      <swiper-item>
        <image :src="item.url" class="slide-image" mode="aspectFill"/>
      </swiper-item>
    </block>
  </swiper>
</template>

<script>
  export default {
    props: {
      images: {
        type: Array
      }
    },
    data() {
      return {
        indicatorDots: true,
        autoplay: true,
        interval: 3000,
        duration: 500,
        indicatorcolor:'#fff',
        indicatoractivecolor:'#d81e06'
      };
    }
  };
</script>

<style scoped>
  /*.swiper {*/
    /*height: 376rpx !important;*/
  /*}*/
  image {
    height: 100%;
    width: 100%;
  }

</style>

<style>
  .swiper-box .wx-swiper-dot{
    width:30rpx;
    display: inline-flex;
    height: 10rpx;
    margin-bottom: 15rpx;
    justify-content:space-between;
    opacity:0.8;
  }
  .swiper-box .wx-swiper-dot::before{
    content: '';
    flex-grow: 1;
    background: rgba(255,255,255,0.8);
    border-radius: 8rpx;
  }
  .swiper-box .wx-swiper-dot-active::before{
    background:rgba(244,0,0,0.8);
  }
</style>

